<?PHP

// MinBS - Minimalist Blogging System
// Developed by Juliano "tibone" Flores
// http://code.google.com/p/minbs/


require_once('required.php');
session_start();
if(!$_SESSION['minbs']=="logged"){
header("location:index.php");
}

$posttitle = $_POST['title'];
$postbody = $_POST['body'];
$postcategory = $_POST['category'];
$postdate = $_POST['date'];


$insert_query = "INSERT INTO minbs_blog (`id`, `title`, `body`, `category`, `date`) VALUES (NULL, '$posttitle', '$postbody', '$postcategory', '$postdate');";

$inserted = mysql_query($insert_query, $connection);

header("location:admin.php");

?>
